[Toplink] How to add c3p0 or DBCP Connection pool?
Posted
by Jean N.T.
on Stack Overflow
See other posts from Stack Overflow
or by Jean N.T.
Published on 2010-04-13T15:22:50Z
Indexed on
2010/04/14
10:32 UTC
Read the original article
Hit count: 419
Hello,
Could you please explain to me how to add a standalone c3pO or DBCP connection pool to my toplink-based JPA project?
I have a persistence.xml file, and everytime I want to query the database, I'm doing this:
EntityManagerFactory emf = this.getEntityManagerFactory();
// Surely using persistence.xml to set up the factory
EntityManager em = emf.createEntityManager(); ...
Where do I build the bridge between my external connection pool manager and Toplink? Any ideas or links are welcomed.
Regards, Jean
© Stack Overflow or respective owner